/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.cw.bean;

import java.util.Vector;

/**
 *
 * @author SVN - Team
 */
public class Establishment {
    private String id;
    private String name;
    private String type;
    private String typeOfServices;
    private String location;
    private Vector listReview = new Vector();

    public Vector getListReview() {
        return listReview;
    }

    public void setListReview(Vector listReview) {
        this.listReview = listReview;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTypeOfServices() {
        return typeOfServices;
    }

    public void setTypeOfServices(String typeOfServices) {
        this.typeOfServices = typeOfServices;
    }

    public String toString() {
        return "id=" + id + "name=" + name + "type=" + type + "typeOfServices=" + typeOfServices + "location=" + location;
    }

    public void convertByteToObject(byte []byteData)  {
        String strData = new String(byteData);
        id = strData.substring(3, strData.indexOf("name="));
        name = strData.substring(strData.indexOf("name=") + 5, strData.indexOf("type="));
        type = strData.substring(strData.indexOf("type=") + 5, strData.indexOf("typeOfServices="));
        typeOfServices = strData.substring(strData.indexOf("typeOfServices=") + 15, strData.indexOf("location="));
        location = strData.substring(strData.indexOf("location=") + 9);
    }
}
